package midone.exchangeskill.base.dagger;


import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import midone.exchangeskill.base.view.Application;
import midone.exchangeskill.utils.NetWorkUtil;
import midone.exchangeskill.utils.SharedPreferencesUtil;
import midone.exchangeskill.utils.ViewUtils;

/**
 * Created by NekoNeko on 2016/11/7.
 */

@Singleton
@Module
public class AppModule {
    Application application;



    public AppModule(Application application) {
        this.application = application;
    }

    @Singleton
    @Provides
    public Application providersApp() {
        return application;
    }

    @Singleton
    @Provides
    public ViewUtils providersViewUtils() {
        return new ViewUtils(application);
    }

    @Singleton
    @Provides
    public SharedPreferencesUtil provideSharePreference(Application application) {
        return new SharedPreferencesUtil(application);
    }
    @Singleton
    @Provides
    public NetWorkUtil provideNewWorkUtil(Application application){
        return new NetWorkUtil(application);
    }

}
